# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Language.V2.Model.XPSDataStats do
  @moduledoc """
  The data statistics of a series of values that share the same DataType.

  ## Attributes

  *   `arrayStats` (*type:* `GoogleApi.Language.V2.Model.XPSArrayStats.t`, *default:* `nil`) - The statistics for ARRAY DataType.
  *   `categoryStats` (*type:* `GoogleApi.Language.V2.Model.XPSCategoryStats.t`, *default:* `nil`) - The statistics for CATEGORY DataType.
  *   `distinctValueCount` (*type:* `String.t`, *default:* `nil`) - The number of distinct values.
  *   `float64Stats` (*type:* `GoogleApi.Language.V2.Model.XPSFloat64Stats.t`, *default:* `nil`) - The statistics for FLOAT64 DataType.
  *   `nullValueCount` (*type:* `String.t`, *default:* `nil`) - The number of values that are null.
  *   `stringStats` (*type:* `GoogleApi.Language.V2.Model.XPSStringStats.t`, *default:* `nil`) - The statistics for STRING DataType.
  *   `structStats` (*type:* `GoogleApi.Language.V2.Model.XPSStructStats.t`, *default:* `nil`) - The statistics for STRUCT DataType.
  *   `timestampStats` (*type:* `GoogleApi.Language.V2.Model.XPSTimestampStats.t`, *default:* `nil`) - The statistics for TIMESTAMP DataType.
  *   `validValueCount` (*type:* `String.t`, *default:* `nil`) - The number of values that are valid.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :arrayStats => GoogleApi.Language.V2.Model.XPSArrayStats.t() | nil,
          :categoryStats => GoogleApi.Language.V2.Model.XPSCategoryStats.t() | nil,
          :distinctValueCount => String.t() | nil,
          :float64Stats => GoogleApi.Language.V2.Model.XPSFloat64Stats.t() | nil,
          :nullValueCount => String.t() | nil,
          :stringStats => GoogleApi.Language.V2.Model.XPSStringStats.t() | nil,
          :structStats => GoogleApi.Language.V2.Model.XPSStructStats.t() | nil,
          :timestampStats => GoogleApi.Language.V2.Model.XPSTimestampStats.t() | nil,
          :validValueCount => String.t() | nil
        }

  field(:arrayStats, as: GoogleApi.Language.V2.Model.XPSArrayStats)
  field(:categoryStats, as: GoogleApi.Language.V2.Model.XPSCategoryStats)
  field(:distinctValueCount)
  field(:float64Stats, as: GoogleApi.Language.V2.Model.XPSFloat64Stats)
  field(:nullValueCount)
  field(:stringStats, as: GoogleApi.Language.V2.Model.XPSStringStats)
  field(:structStats, as: GoogleApi.Language.V2.Model.XPSStructStats)
  field(:timestampStats, as: GoogleApi.Language.V2.Model.XPSTimestampStats)
  field(:validValueCount)
end

defimpl Poison.Decoder, for: GoogleApi.Language.V2.Model.XPSDataStats do
  def decode(value, options) do
    GoogleApi.Language.V2.Model.XPSDataStats.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Language.V2.Model.XPSDataStats do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
